const imagePath = 'http://localhost:2230/uploads/7a442a26-1763-4086-a4c8-c378fc68becd.png'
const videoPath = 'http://localhost:2230/uploads/{D719FDC7-F4F3-4F54-BDD1-D457D0CE665C}.mp4'
const groupImageUrl = 'http://localhost:2230/uploads/告警目标.png'
class GaoxinService {
  async getOriginList(params) {
    try {
      let data = {
        records: [
          {
            tblId: 75430,
            alarmId: '3cce0163-78e1-11f0-a53a-c8c465c68ecc',
            imagePath,
            videoPath,
            eventId: null,
            nameInp: '杭甬高速',
            direction: '35',
            directionType: null,
            alarmTime: '2025-08-14T15:40:55',
            milestone: 288982,
            endMilestone: 288982,
            roadId: '33141',
            organizationId: '9a929659-6ca0-11ea-92ac-000c299371f9',
            alertLevel: '1',
            latitude: 29.963495,
            longitude: 121.33181,
            eventType: '停驶',
            eventTypeId: '66003',
            content: 'G92 杭甬高速 宁波方向 K288+982 车型：货车 【硬路肩】',
            contentCustom: null,
            source: '智慧算法',
            sourceId: '66101',
            company: '之江智能',
            companyId: '662HK_hhy2',
            directionDes: '宁波方向',
            sourceEventId: 'AB662FC2-6BA9-4778-80F7-783793E69112',
            jamSpeed: null,
            longTime: null,
            jamDist: null,
            weather: null,
            dealFlag: '8',
            dealTime: null,
            readFlag: '0',
            readTime: null,
            voiceUrl: null,
            userId: null,
            suspendTime: null,
            serverIp: null,
            clientIp: null,
            popupFlag: null,
            voiceFlag: null,
            phone: null,
            frameFlag: null,
            destroyTime: null,
            alarmPlace: '硬路肩',
            laneIndex: 5,
            deviceId: '102406820',
            countermeasures: null,
            supplement: null,
            relAlarmId: null,
            uuid: null,
            situationalList: null,
            redundance: null,
            rampId: null,
            tollId: null,
            createTime: '2025-08-14T15:40:57',
            createTimeSys: null,
            modifyTimeSys: null,
            consumeTag: null,
            dbCreateTime: '2025-08-14T15:40:51',
            dbUpdateTime: '2025-08-14T15:40:51',
            checkFlag: 0,
            adviceFlag: 0,
            adviceReason: '原因xxxxxx',
            short_name: null,
          },
        ],
        total: 10,
      }
      return data
    } catch (error) {
      console.error('获取原始告警列表失败:', error)
      throw error
    }
  }

  // 告警集列表
  async getAlaramCollectionsList(params) {
    try {
      let data = {
        records: [
          {
            id: 67836,
            collectionId: '5bdd02ba-4bf6-4130-8580-f4256ef4da20',
            roadId: '33112',
            deviceId: '112101736',
            deviceName: 'G60 杭金衢高速 杭州方向',
            milestone: 215155,
            eventType: '行人闯入',
            disposalAdvice: 1,
            collectionType: 0,
            personCheckEventType: 2,
            relatedIdList: '71200,71214,71221',
            earliestAlarmTime: '2025-08-14T10:12:05',
            latestAlarmTime: '2025-08-14T10:13:03',
            relatedAlarmNum: 3,
            collectionStatus: 1,
            createTime: '2025-08-14T10:12:02',
            modifyTime: '2025-08-14T10:13:00',
          },
          /* {
            collectionId: 'bcf54d41-f16c-11ef-a53a-c8c465c68ecc',
            createTime: '2025-03-09 12:00',
            updateTime: '2025-03-09 12:00',
            road: '杭金衢高速',
            direction: '杭向',
            alarmLocation: '杭金高速道 双向 K199+100',
            eventType: '停驶',
            handlerSuggestion: '尽快确认',
            relatedCount: '4',
            relatedAccuracyRate: '0.95',
          }, */
        ],
        total: 10,
      }

      return data
    } catch (error) {
      console.error('获取原始告警列表失败:', error)
      throw error
    }
  }

  // 告警集详情 左侧列表
  async getAlarmCollectionsDetail() {
    return [
      {
        id: 61247,
        collectionId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539',
        groupId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539_1755112373837',
        groupImageUrl: '/data/image/snap/20250813/cropped_20250814_a81d0937-7848-11f0-a53a-c8c465c68ecc_0_63012.jpg',
        groupEventType: '停驶',
        alarmId: 'a81d0937-7848-11f0-a53a-c8c465c68ecc',
        imagePath,
        videoPath,
        eventType: '停驶',
        alarmTime: '2025-08-13T21:23:07',
        extractImageUrl: '/data/image/snap/20250813/cropped_20250814_a81d0937-7848-11f0-a53a-c8c465c68ecc_0_63012.jpg',
        alarmElement: 'sedan',
        point1X: 1538,
        point1Y: 216,
        point2X: 1538,
        point2Y: 216,
        leadCompareIou: 0,
        leadCompareMinute: 0,
        createTime: '2025-08-14T03:12:53',
        modifyTime: '2025-08-14T03:12:53',
      },
      {
        id: 59522,
        collectionId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539',
        groupId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539_1755112066285',
        groupImageUrl,
        groupEventType: '停驶',
        alarmId: '0a1c6ee7-7848-11f0-a53a-c8c465c68ecc',
        imagePath,
        videoPath,
        eventType: '停驶',
        alarmTime: '2025-08-13T21:18:42',
        extractImageUrl: '/data/image/snap/20250813/cropped_20250814_0a1c6ee7-7848-11f0-a53a-c8c465c68ecc_2_61270.jpg',
        alarmElement: 'sedan',
        point1X: 1590,
        point1Y: 236,
        point2X: 1590,
        point2Y: 236,
        leadCompareIou: 0,
        leadCompareMinute: 0,
        createTime: '2025-08-14T03:07:46',
        modifyTime: '2025-08-14T03:07:46',
      },
    ]
  }

  // 告警集详情 右侧动态记录
  async getAlarmCollectionsRecords({ groupId }) {
    const list = [
      {
        id: 52437,
        collectionId: '0ba2a5a5-3ecb-4758-aafd-a9bf44adcce9',
        groupId: 'groupId1111',
        groupImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        groupEventType: '停驶',
        alarmId: '6f5aa957-6d81-11f0-a53a-c8c465c68ecc',
        imagePath: 'http://localhost:2230/uploads/7a442a26-1763-4086-a4c8-c378fc68becd.png',
        videoPath: 'http://localhost:2230/uploads/{D719FDC7-F4F3-4F54-BDD1-D457D0CE665C}.mp4',
        eventType: '停驶',
        alarmTime: '2025-07-31T04:11:42',
        extractImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        alarmElement: 'truck',
        point1X: 1232,
        point1Y: 226,
        point2X: 1232,
        point2Y: 226,
        leadCompareIou: 0.0,
        leadCompareMinute: 0.0,
        createTime: '2025-08-01T16:06:42',
        modifyTime: '2025-08-01T16:06:42',
      },
      {
        id: 5246,
        collectionId: '0ba2a5a5-3ecb-4758-aafd-a9bf44adcce9',
        groupId: 'groupId1111',
        groupImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        groupEventType: '停驶2',
        alarmId: '6f5aa957-6d81-11f0-a53a-c8c465c68ecc22',
        imagePath: 'http://localhost:2230/uploads/7a442a26-1763-4086-a4c8-c378fc68becd.png',
        videoPath: 'http://localhost:2230/uploads/{D719FDC7-F4F3-4F54-BDD1-D457D0CE665C}.mp4',
        eventType: '停驶',
        alarmTime: '2025-07-31T04:11:42',
        extractImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        alarmElement: 'truck',
        point1X: 1232,
        point1Y: 226,
        point2X: 1232,
        point2Y: 226,
        leadCompareIou: 0.0,
        leadCompareMinute: 0.0,
        createTime: '2025-08-01T16:06:42',
        modifyTime: '2025-08-01T16:06:42',
      },
      {
        id: 52437,
        collectionId: '0ba2a5a5-3ecb-4758-aafd-a9bf44adcce9',
        groupId: 'groupId2222',
        groupImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        groupEventType: '停驶',
        alarmId: '6f5aa957-6d81-11f0-a53a-c8c465c68ecc',
        imagePath: 'http://localhost:2230/uploads/7a442a26-1763-4086-a4c8-c378fc68becd.png',
        videoPath: 'http://localhost:2230/uploads/{D719FDC7-F4F3-4F54-BDD1-D457D0CE665C}.mp4',
        eventType: '停驶',
        alarmTime: '2025-07-31T04:11:42',
        extractImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        alarmElement: 'truck',
        point1X: 1232,
        point1Y: 226,
        point2X: 1232,
        point2Y: 226,
        leadCompareIou: 0.0,
        leadCompareMinute: 0.0,
        createTime: '2025-08-01T16:06:42',
        modifyTime: '2025-08-01T16:06:42',
      },
      {
        id: 5246,
        collectionId: '0ba2a5a5-3ecb-4758-aafd-a9bf44adcce9',
        groupId: 'groupId2222',
        groupImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        groupEventType: '停驶2',
        alarmId: '6f5aa957-6d81-11f0-a53a-c8c465c68ecc22',
        imagePath: 'http://localhost:2230/uploads/7a442a26-1763-4086-a4c8-c378fc68becd.png',
        videoPath: 'http://localhost:2230/uploads/{D719FDC7-F4F3-4F54-BDD1-D457D0CE665C}.mp4',
        eventType: '停驶',
        alarmTime: '2025-07-31T04:11:42',
        extractImageUrl: '/data/image/snap/20250731/frame_20250801_6f5aa957-6d81-11f0-a53a-c8c465c68ecc_0_54349.jpg',
        alarmElement: 'truck',
        point1X: 1232,
        point1Y: 226,
        point2X: 1232,
        point2Y: 226,
        leadCompareIou: 0.0,
        leadCompareMinute: 0.0,
        createTime: '2025-08-01T16:06:42',
        modifyTime: '2025-08-01T16:06:42',
      },
      {
        id: 69452,
        collectionId: '177ad210-a7cb-494d-bddc-d2eee023f9e5',
        groupId: '177ad210-a7cb-494d-bddc-d2eee023f9e5_1755137582003',
        groupImageUrl: '/data/image/snap/20250814/cropped_20250814_35a83c33-78b4-11f0-a53a-c8c465c68ecc_1_71228.jpg',
        groupEventType: '行人',
        alarmId: '35a83c33-78b4-11f0-a53a-c8c465c68ecc',
        imagePath: 'http://33.64.93.45:21006/DB/pic/202508/84/{E337930E-D60D-4DC9-9CBB-9621BB8C4CDC}.jpg',
        videoPath: 'http://33.64.93.45:21006/DB/video/202508/84/{E337930E-D60D-4DC9-9CBB-9621BB8C4CDC}.mp4',
        eventType: '行人',
        alarmTime: '2025-08-14T10:13:03',
        extractImageUrl: '/data/image/snap/20250814/cropped_20250814_35a83c33-78b4-11f0-a53a-c8c465c68ecc_1_71228.jpg',
        alarmElement: 'builder',
        point1X: 907,
        point1Y: 174,
        point2X: 907,
        point2Y: 174,
        leadCompareIou: 0,
        leadCompareMinute: 0,
        createTime: '2025-08-14T10:13:11',
        modifyTime: '2025-08-14T10:13:11',
      },
      {
        id: 69446,
        collectionId: '177ad210-a7cb-494d-bddc-d2eee023f9e5',
        groupId: '177ad210-a7cb-494d-bddc-d2eee023f9e5_1755137582003',
        groupImageUrl: '/data/image/snap/20250814/cropped_20250814_3061bd5d-78b4-11f0-a53a-c8c465c68ecc_1_71218.jpg',
        groupEventType: '停驶',
        alarmId: '3061bd5d-78b4-11f0-a53a-c8c465c68ecc',
        imagePath: 'http://33.64.93.45:21006/DB/pic/202508/80/{7019AF5B-3DD9-426F-88E7-A988F7AB9CE7}.jpg',
        videoPath: 'http://33.64.93.45:21006/DB/video/202508/80/{7019AF5B-3DD9-426F-88E7-A988F7AB9CE7}.mp4',
        eventType: '停驶',
        alarmTime: '2025-08-14T10:12:54',
        extractImageUrl: '/data/image/snap/20250814/cropped_20250814_3061bd5d-78b4-11f0-a53a-c8c465c68ecc_1_71218.jpg',
        alarmElement: 'builder',
        point1X: 907,
        point1Y: 322,
        point2X: 907,
        point2Y: 322,
        leadCompareIou: 0,
        leadCompareMinute: 0,
        createTime: '2025-08-14T10:13:02',
        modifyTime: '2025-08-14T10:13:02',
      },
      {
        id: 61247,
        collectionId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539',
        groupId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539_1755112373837',
        groupImageUrl: '/data/image/snap/20250813/cropped_20250814_a81d0937-7848-11f0-a53a-c8c465c68ecc_0_63012.jpg',
        groupEventType: '停驶',
        alarmId: 'a81d0937-7848-11f0-a53a-c8c465c68ecc',
        imagePath: 'http://33.69.144.246:21080/DB/pic/202508/80/{533D3B7B-36B6-4F38-A4D7-13078D845120}.jpg',
        videoPath: 'http://33.69.144.246:21080/DB/video/202508/80/{533D3B7B-36B6-4F38-A4D7-13078D845120}.mp4',
        eventType: '停驶',
        alarmTime: '2025-08-13T21:23:07',
        extractImageUrl: '/data/image/snap/20250813/cropped_20250814_a81d0937-7848-11f0-a53a-c8c465c68ecc_0_63012.jpg',
        alarmElement: 'sedan',
        point1X: 1538,
        point1Y: 216,
        point2X: 1538,
        point2Y: 216,
        leadCompareIou: 0,
        leadCompareMinute: 0,
        createTime: '2025-08-14T03:12:53',
        modifyTime: '2025-08-14T03:12:53',
      },
      {
        id: 59522,
        collectionId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539',
        groupId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539_1755112066285',
        groupImageUrl: '/data/image/snap/20250813/cropped_20250814_0a1c6ee7-7848-11f0-a53a-c8c465c68ecc_2_61270.jpg',
        groupEventType: '停驶',
        alarmId: '0a1c6ee7-7848-11f0-a53a-c8c465c68ecc',
        imagePath: 'http://33.69.144.246:21080/DB/pic/202508/80/{F64DF74B-BD33-431A-B99A-75512F4C8E77}.jpg',
        videoPath: 'http://33.69.144.246:21080/DB/video/202508/80/{F64DF74B-BD33-431A-B99A-75512F4C8E77}.mp4',
        eventType: '停驶',
        alarmTime: '2025-08-13T21:18:42',
        extractImageUrl: '/data/image/snap/20250813/cropped_20250814_0a1c6ee7-7848-11f0-a53a-c8c465c68ecc_2_61270.jpg',
        alarmElement: 'sedan',
        point1X: 1590,
        point1Y: 236,
        point2X: 1590,
        point2Y: 236,
        leadCompareIou: 0,
        leadCompareMinute: 0,
        createTime: '2025-08-14T03:07:46',
        modifyTime: '2025-08-14T03:07:46',
      },
      {
        id: 59522,
        collectionId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539',
        groupId: 'b8178358-bfc6-43d3-9de7-f1dec9fa6539_1755112066285',
        groupImageUrl: '/data/image/snap/20250813/cropped_20250814_0a1c6ee7-7848-11f0-a53a-c8c465c68ecc_2_61270.jpg',
        groupEventType: '停驶',
        alarmId: '0a1c6ee7-7848-11f0-a53a-c8c465c68ecc',
        imagePath: 'http://33.69.144.246:21080/DB/pic/202508/80/{F64DF74B-BD33-431A-B99A-75512F4C8E77}.jpg',
        videoPath: 'http://33.69.144.246:21080/DB/video/202508/80/{F64DF74B-BD33-431A-B99A-75512F4C8E77}.mp4',
        eventType: '停驶',
        alarmTime: '2025-08-13T21:18:42',
        extractImageUrl: '/data/image/snap/20250813/cropped_20250814_0a1c6ee7-7848-11f0-a53a-c8c465c68ecc_2_61270.jpg',
        alarmElement: 'sedan',
        point1X: 1590,
        point1Y: 236,
        point2X: 1590,
        point2Y: 236,
        leadCompareIou: 0,
        leadCompareMinute: 0,
        createTime: '2025-08-14T03:07:46',
        modifyTime: '2025-08-14T03:07:46',
      },
    ]
    const arr = list.filter((item) => item.groupId === groupId)
    return arr
  }

  async getFeature({ alarmId }) {
    try {
      const list = [
        {
          id: 1951192853567864834,
          alarmId: '6f5aa957-6d81-11f0-a53a-c8c465c68ecc',
          imagePath: 'http://localhost:2230/uploads/7a442a26-1763-4086-a4c8-c378fc68becd.png',
          videoPath: 'http://localhost:2230/uploads/{D719FDC7-F4F3-4F54-BDD1-D457D0CE665C}.mp4',
          abnormalLocation: null,
          abnormalType: '停驶',
          collectionMacthStatus: 0,
          // involvedVehicleInfo: '{"vehicleNum":1,"vehicleType":"truck"}',
          involvedVehicleInfo: null,
          // involvedPersonInfo: '{"vehicleNum":1,"vehicleType":"truck"}',
          involvedPersonInfo: null,
          weatherCondition: null,
          laneOccupyInfo: null,
          // rescueForce: '[{"vehicleNum":1,"vehicleType":"truck"}]',
          rescueForce: null,
          congestionStatus: null,
          dangerElement: null,
          disposalAdvice: 1,
          adviceReason: '物体类型非车辆111',
          alarmElement: 'truck',
          // alarmElementRange: '[{"occur_num":3,"name":"cone_barrel"}]',
          alarmElementRange: null,
          createTime: '2025-08-01T16:06:42',
          modifyTime: '2025-08-01T16:06:42',
          // 暂无下面字段
          dealFlag: 0,
        },
        {
          id: 1953731733445787650,
          alarmId: 'da2c2e1d-742e-11f0-a53a-c8c465c68ecc',
          imagePath: 'http://33.69.47.246:21080/DB/pic/202508/80/{4C1C0549-CE48-431C-AA38-4EB3FF1389EC}.jpg',
          videoPath: 'http://33.69.47.246:21080/DB/video/202508/80/{4C1C0549-CE48-431C-AA38-4EB3FF1389EC}.mp4',
          abnormalLocation: '硬路肩',
          abnormalType: '停驶',
          collectionMacthStatus: 0,
          involvedVehicleInfo: null,
          involvedPersonInfo: null,
          weatherCondition: null,
          laneOccupyInfo: null,
          rescueForce: null,
          congestionStatus: null,
          dangerElement: null,
          disposalAdvice: 0,
          adviceReason: '视频抽帧失败',
          alarmElement: null,
          alarmElementRange: null,
          createTime: '2025-08-08T16:15:18',
          modifyTime: '2025-08-08T16:15:18',
        },
        {
          id: 1955883739379736600,
          alarmId: '69e27842-78da-11f0-a53a-c8c465c68ecc',
          imagePath,
          videoPath,
          abnormalLocation: null,
          abnormalType: '停驶',
          collectionMacthStatus: 0,
          involvedVehicleInfo: '{"vehicleNum":1,"vehicleType":"maintenance_construction_vehicle"}',
          involvedPersonInfo: null,
          weatherCondition: null,
          laneOccupyInfo: null,
          rescueForce: 'maintenance_construction_vehicle',
          congestionStatus: null,
          dangerElement: null,
          disposalAdvice: 3,
          adviceReason: '道路作业(短期/持续性作业)',
          alarmElement: 'maintenance_construction_vehicle',
          alarmElementRange: '[{"occur_num":5,"name":"truck"},{"occur_num":1,"name":"coach"},{"occur_num":18,"name":"sedan"}]',
          createTime: '2025-08-14T14:46:37',
          modifyTime: '2025-08-14T14:46:37',
        },
        {
          id: 1951192853567864835,
          alarmId: '6f5aa957-6d81-11f0-a53a-c8c465c68ecc22',
          imagePath: 'http://localhost:2230/uploads/7a442a26-1763-4086-a4c8-c378fc68becd.png',
          videoPath: 'http://localhost:2230/uploads/{D719FDC7-F4F3-4F54-BDD1-D457D0CE665C}.mp4',
          abnormalLocation: null,
          abnormalType: '停驶',
          collectionMacthStatus: 0,
          // involvedVehicleInfo: '{"vehicleNum":1,"vehicleType":"truck"}',
          involvedVehicleInfo: null,
          // involvedPersonInfo: '{"vehicleNum":1,"vehicleType":"truck"}',
          involvedPersonInfo: null,
          weatherCondition: null,
          laneOccupyInfo: null,
          // rescueForce: '[{"vehicleNum":1,"vehicleType":"truck"}]',
          rescueForce: null,
          congestionStatus: null,
          dangerElement: null,
          disposalAdvice: 1,
          adviceReason: '物体类型非车辆222',
          alarmElement: 'truck',
          // alarmElementRange: '[{"occur_num":3,"name":"cone_barrel"}]',
          alarmElementRange: null,
          createTime: '2025-08-01T16:06:42',
          modifyTime: '2025-08-01T16:06:42',
          // 暂无下面字段
          dealFlag: 0,
        },
        {
          id: 1955709159268753400,
          alarmId: 'a81d0937-7848-11f0-a53a-c8c465c68ecc',
          imagePath,
          videoPath,
          abnormalLocation: '硬路肩',
          abnormalType: '停驶',
          collectionMacthStatus: 0,
          involvedVehicleInfo: '{"vehicleNum":1,"vehicleType":"sedan"}',
          involvedPersonInfo: null,
          weatherCondition: null,
          laneOccupyInfo: null,
          rescueForce: '',
          congestionStatus: null,
          dangerElement: null,
          disposalAdvice: 3,
          adviceReason: '道路作业(短期/持续性作业)',
          alarmElement: 'sedan',
          alarmElementRange: '[{"occur_num":5,"name":"cone_barrel"},{"occur_num":2,"name":"truck"},{"occur_num":8,"name":"sedan"}]',
          createTime: '2025-08-14T03:12:54',
          modifyTime: '2025-08-14T03:12:54',
        },
        {
          id: 1955707869369278500,
          alarmId: '0a1c6ee7-7848-11f0-a53a-c8c465c68ecc',
          imagePath,
          videoPath,
          abnormalLocation: '硬路肩',
          abnormalType: '停驶',
          collectionMacthStatus: 0,
          involvedVehicleInfo: '{"vehicleNum":1,"vehicleType":"sedan"}',
          involvedPersonInfo: null,
          weatherCondition: null,
          laneOccupyInfo: null,
          rescueForce: 'builder',
          congestionStatus: null,
          dangerElement: null,
          disposalAdvice: 3,
          adviceReason: '道路作业(短期/持续性作业)',
          alarmElement: 'sedan',
          alarmElementRange: '[{"occur_num":3,"name":"cone_barrel"},{"occur_num":2,"name":"truck"},{"occur_num":7,"name":"sedan"}]',
          createTime: '2025-08-14T03:07:46',
          modifyTime: '2025-08-14T03:07:46',
        },
        {
          id: 1955897438693826600,
          alarmId: '3cce0163-78e1-11f0-a53a-c8c465c68ecc',
          imagePath,
          videoPath,
          abnormalLocation: '硬路肩',
          abnormalType: '停驶',
          collectionMacthStatus: 0,
          involvedVehicleInfo: '{"vehicleNum":1,"vehicleType":"truck"}',
          involvedPersonInfo: null,
          weatherCondition: null,
          laneOccupyInfo: null,
          rescueForce: 'builder,maintenance_construction_vehicle',
          congestionStatus: null,
          dangerElement: null,
          disposalAdvice: 2,
          adviceReason: '无需依据',
          alarmElement: 'truck',
          alarmElementRange:
            '[{"occur_num":1,"name":"spills"},{"occur_num":1,"name":"builder"},{"occur_num":1,"name":"maintenance_construction_vehicle"},{"occur_num":13,"name":"cone_barrel"}]',
          createTime: '2025-08-14T15:41:03',
          modifyTime: '2025-08-14T15:41:03',
        },
      ]
      const obj = list.find((item) => item.alarmId === alarmId)
      return obj || {}
    } catch (error) {
      console.error('获取原始告警列表失败:', error)
      throw error
    }
  }
  // 关联规则配置
  async getRelatedSettings() {
    return [
      {
        id: 1,
        collectionType: 0,
        durationMinutes: 60,
        description: '无法判断类型的告警集，聚合时长60分钟',
        createTime: '2025-08-18T22:47:31',
        modifyTime: '2025-08-18T22:47:31',
      },
      {
        id: 2,
        collectionType: 1,
        durationMinutes: 15,
        description: '正检类型的告警集，聚合时长15分钟',
        createTime: '2025-08-18T22:47:31',
        modifyTime: '2025-08-18T22:47:31',
      },
      {
        id: 3,
        collectionType: 2,
        durationMinutes: 30,
        description: '误检类型的告警集，聚合时长30分钟',
        createTime: '2025-08-18T22:47:31',
        modifyTime: '2025-08-18T22:47:31',
      },
    ]

    /* return [
      { id: 1, typeName: '正检告警集', interval: 10, isEditing: false, editValue: '' },
      { id: 2, typeName: '误检告警集', interval: 30, isEditing: false, editValue: '' },
      { id: 3, typeName: '无法判断告警集', interval: 50, isEditing: false, editValue: '' },
    ] */
  }
}

module.exports = new GaoxinService()
